import cv2
import os
import glob

image_folder = 'rgb_deptha'
video_name = 'video_d.avi'

frame = cv2.imread("rgb_deptha/00001_depth.jpg")
height, width, layers = frame.shape

video = cv2.VideoWriter(video_name, 0, 10, (width,height))

allpath = []
for filepath in glob.glob(os.path.join(image_folder, '*.jpg')):
	allpath.append(filepath)
allpath.sort()


for image in allpath:
	video.write(cv2.imread(image))

cv2.destroyAllWindows()
video.release()
